<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;

class BaseModel extends Model
{
  public $timestamps = true;
  static $deleted = 1;
  static $noDeleted = 0;
    /**
     * Desc: 自动转化时间格式
     * Time: 2021/4/16 10:12
     * @param DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
}
